﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo4
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //// 显示转换
            //var num1 = 5D;
            //var num2 = 2;
            //var result = num1 / num2;
            //Console.WriteLine(result);

            var d1 = 5.123412321D;
            var d2 = 0;
            // 强制转换
            //d2 = (int)d1;
            d2 = Convert.ToInt32(d1);
            Console.WriteLine(d2);

            Console.ReadKey();
        }
    }
}
